<?php

/**
 * ClassName:校验是否测试
 * @auditor LeiJunXiang
 * @time 2025/01/14
 */

namespace app\factory\tool;

use app\middleware\EncrypCheck;
use think\facade\Log;

class VerifyIsTest
{
    const type = "cy-type-key";
    const TOOL_VERIFY_IS_TEST = "VerifyIsTest";
    /**
     * 是否测试
     * @param $request
     * @return bool
     */
    public function startVerify($request)
    {
        $flag = false;
        if (!$request) {
            return $flag;
        }
        $headerParam = $request->header(self::type);
        $getParam = $request->get(self::type);
        if ($headerParam == NO_ENCRYP_PARAM || $getParam == NO_ENCRYP_PARAM) {
            $flag = true;
        }
        return $flag;
    }
}